package mianxiangduixiang.Week8.Exam2;

import mianxiangduixiang.Week8.Exam1.Point;

/**
 * @Author JetZhang
 * @Date 2021/11/2
 */
public class Rectangle extends Shape {
    private int l, w;

    public int getArea() {
        return l * w;
    }

    @Override
    public String toString() {
        return super.toString() + "Rectangle{" +
                "l=" + l +
                ", w=" + w +
                '}';
    }

    public int getL() {
        return l;
    }

    public void setL(int l) {
        this.l = l;
    }

    public int getW() {
        return w;
    }

    public void setW(int w) {
        this.w = w;
    }

    public Rectangle() {
    }

    public Rectangle(Point point, int l, int w) {
        super(point);
        this.l = l;
        this.w = w;
    }

    public Rectangle(int l, int w) {
        this.l = l;
        this.w = w;
    }
}
